<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="MyServlet.User2" %>

<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>JTHR</title>
<link type="text/css" href="css/menu.css" rel="stylesheet" />
<link type="text/css" href="css/stylesheet.css" rel="stylesheet" />
<link type="text/css" href="css/js_slider.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/menu.js"></script>

<!-- SLIDER JS -->
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<!-- use jssor.slider.mini.js (39KB) or jssor.sliderc.mini.js (31KB, with caption, no slideshow) or jssor.sliders.mini.js (26KB, no caption, no slideshow) instead for release -->
<!-- jssor.slider.mini.js = jssor.sliderc.mini.js = jssor.sliders.mini.js = (jssor.core.js + jssor.utils.js + jssor.slider.js) -->
<script type="text/javascript" src="js/jssor.core.js"></script>
<script type="text/javascript" src="js/jssor.utils.js"></script>
<script type="text/javascript" src="js/jssor.slider.js"></script>
<script type="text/javascript" src="js/js_slider_script.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!--Slider ends-->



<script type="text/javascript">
    $(function () {
        $("a.ajaxLink").click(function () {
            $('#ajaxDiv').load($(this).attr('href'));
            return false;
        });
    });
</script>



</head>
<body>
	<div>
		<img src="images/msg_logo.jpg" width="300" height="100" />
		
		<form style="display: inline-block; padding-left: 90px"
			onsubmit="return onSubmit()" action="login" method="POST">
			Username <input id="user" class="inputtext" type="text" name="user" />
			Password <input id="pass" class="inputtext" type="password"
				name="pass" /> <input id="u_0_l" type="submit" tabindex="4"
				value="Log in" />
		</form>

	</div>
	<div id="menu">
		<ul class="menu">
			<li id="home"><a class="ajaxLink" href="/jthr-web/jsp/location.jsp"><span>Home</span></a></li>
			<li id="authors"><a class="ajaxLink" href="/jthr-web/jsp/authors.html"><span>Authors</span></a></li>
			<li><a href="#"><span>Project description</span></a></li>
		</ul>
	</div>

	<div id="ajaxDiv">
		<%@ include file="location.jsp" %>
	</div>
	
	<div id="myDiv2">
	
		<c:if test="${!empty userList }">
			<c:forEach items="${userList}" var="user">
				<div style="padding: 2em 6em;">
				<form action="/Assignment3/updateUser/${user.id}"  method="POST">
					<table>
					<tr>
						<td><a href="/Assignment3/deleteUser/${user.id}"><button> Delete </a></button> </td>
						<td>
							<table>
							<tr><td>Name: ${user.name}</td></tr>
							<tr><td>Password: ${user.password}</td></tr>
							<tr><td>Type: ${user.type}</td></tr>
						
							</table>
						</td>
						<td><img src="images/user.jpg" height="150" width="250"></td>
						<td>
							<table>
							<tr><td>Name:</td><td><input class="inputtext" type="text" name="name"/></td></tr>
							<tr><td>Password:</td><td>  <input class="inputtext" type="text" name="password"/></td></tr>
							<tr><td>Type:</td><td>   <input class="inputtext" type="text" name="type"/></td></tr>
						
							</table>
							
						</td>
						<td><input type="submit" tabindex="4" value="Update"/></td>
					</tr>
					</table>
					</form>
				</div>
			</c:forEach>
		</c:if>
		</div>

</body>
</html>